package com.wms.service.impl;

import com.wms.core.R;
import com.wms.dto.PermissionVo;
import com.wms.dto.SuserWareDTO;
import com.wms.entity.WarehouseNode;
import com.wms.mapper.WarehouseNodeMapper;
import com.wms.service.WarehouseNodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WarehouseNodeServiceImpl implements WarehouseNodeService {
    @Autowired
    WarehouseNodeMapper warehouseNodeMapper;

    @Override
    public List<WarehouseNode> selectTopLevelWarehouses() {
        return warehouseNodeMapper.selectTopLevelWarehouses();
    }

    @Override
    public int updatePermission(PermissionVo permissionVo) {
        return warehouseNodeMapper.updatePermission(permissionVo);
    }

    @Override
    public int insertPermission(PermissionVo permissionVo) {
        return warehouseNodeMapper.insertPermission(permissionVo);
    }

    @Override
    public List<SuserWareDTO> selectUser(Integer id) {
        return warehouseNodeMapper.selectUser(id);
    }
}
